/**
 * Copyright (c) 2016 Lenovo Group
 * All Rights Reserved.
 * 
 * Project Name:lmrp-base
 * Create Time: 2016年1月28日 下午4:59:15
 */
package com.lenovo.lmrp.api.constant;

/**
 * @author zhangzhenga
 *
 */
public enum TicketPolicy {
	ACCEPT(0, "派单"), GRAB(1, "抢单");

	private int policy;
	private String descr;

	private TicketPolicy(int policy, String descr) {
		this.policy = policy;
		this.descr = descr;
	}

	public int getPolicy() {
		return this.policy;
	}

	public static TicketPolicy get(int policy) {
		for (TicketPolicy assignPolicy : TicketPolicy.values()) {
			if (assignPolicy.getPolicy() == policy)
				return assignPolicy;
		}
		return null;
	}
}
